package com.ruoyi.system.service.aggregation.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.aggregation.Account;
import com.ruoyi.system.mapper.aggregation.AccountMapper;
import com.ruoyi.system.service.aggregation.IAccountService;

/**
 * 账户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-01
 */
@Service
public class AccountServiceImpl implements IAccountService 
{
    @Autowired
    private AccountMapper accountMapper;

    @Override
    public Account selectAccountById(Long id)
    {
        return accountMapper.selectAccountById(id);
    }

    @Override
    public Account selectAccountByUserId(Long userId)
    {
        return accountMapper.selectAccountByUserId(userId);
    }

    @Override
    public int updateAccount(Account account)
    {
        account.setUpdateTime(DateUtils.getNowDate());
        return accountMapper.updateAccount(account);
    }
}

